package cn.tedu.boot21.controller;

import cn.tedu.boot21.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@Controller
public class UserController {

    @RequestMapping("/login")
    @ResponseBody // 注解作用：以返回值的方式给客户端响应数据
    public String login(User user) throws IOException {

        return "接收到："+user.getUsername()+"-"+user.getPassword();
    }
}
